package org.blogwu.learn.designpattern.chapter11.v2;

/**
 * @author hyf
 * @date 2018-10-27
 **/
public class Main {
    public static void main(String[] args) {
        ABattercake aBattercake;
        aBattercake = new Battercake();//基础的煎饼
        aBattercake = new EggDecorator(aBattercake);//加一个鸡蛋
        aBattercake = new EggDecorator(aBattercake);//在加一个鸡蛋
        aBattercake = new SausageDecorator(aBattercake);//不low,在加一个香肠，搞个豪华版
        aBattercake = new SausageDecorator(aBattercake);//在在加一个香肠
        System.out.println(aBattercake.getDesc() + " 销售价格：" + aBattercake.cost());

    }
}
